package com.deep.cart.service;

import com.deep.cart.model.vo.CartItemVO;
import com.deep.cart.model.vo.CartVO;

import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * @author Deep
 * @date 2022/2/9
 */
public interface CartService {
    /**
     * 获取用户购物车
     */
    CartVO getCart() throws ExecutionException, InterruptedException;

    /**
     * 添加商品到购物车
     *  @param skuId 商品id
     * @param num   商品数量
     * @return
     */
    CartItemVO addToCart(Long skuId, Integer num) throws ExecutionException, InterruptedException;

    /**
     * 获取购物项详情
     *
     * @param skuId 商品id
     */
    CartItemVO getCartItem(Long skuId);

    List<CartItemVO> getUserCartItems();
}
